Setting Up Your Database

You can set up your database to calculate POSTNET bar codes automatically. For FileMaker Pro users the exact calculations are shown below and are also included in the FileMaker Pro Example. If you use a database other than FileMaker Pro, you will still be able to perform these calculations. However, the terminology may be different from what we have shown here.

BEFORE WORKING WITH YOUR DATABASE, MAKE SURE YOU HAVE MADE A BACKUP COPY!

In your FileMaker Pro database, create a field called ZIPcode. Designate this as a text field. (Note: If you already have a text field for ZIP codes, you do not have to create a new one. Just substitute your field name wherever the name ZIPcode appears. 

The ZIPcode field contains your ZIP+4 code for each mailing address. Remember, the ZIP+4 code must always have a dash between the fifth and sixth digits (i.e. XXXXX-XXXX).

Create another field and name it CorrectionDigit. Designate this as a calculation field. In the formula window, enter the following formula:

Right (100-(Middle (ZIPcode,1,1) + Middle (ZIPcode,2,1) + Middle (ZIPcode,3,1) + Middle (ZIPcode,4,1) + Middle (ZIPcode,5,1) + Middle (ZIPcode,7,1) + Middle (ZIPcode,8,1) + Middle (ZIPcode,9,1) + Middle (ZIPcode,10,1)

Make sure you designate the result of this calculation as text.

In this Correction Digit formula, the 9 digits of the ZIP code are being broken apart, added together and subtracted from the value 100. Then the right-most digit is selected as the Correction Digit. This is the same process that was explained in the section “Understanding Bar Coding.”

Create another field called BARcode. Make sure you designate this as a text field. In the formula window, enter the following formula:

             “!” & Left (ZIPcode,5) & Right (ZIPcode,4) & CorrectionDigit & “!”

Make sure you designate the result of this calculation as text.

The field called BARcode concatenates the entire ZIP+4 code into its proper bar code sequence (i.e. Framing Bar  &  Left Five characters of ZIP+4  & Right Four characters of ZIP+4  &  Correction Digit & Framing Bar)

Now that your calculations are set up, it’s time to create a layout  for printing the bar code.